<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="author" content="Liang wei">
		<meta name="viewport" content="width= device-width , user-scalable=no,initial-scale=1.0" />
		<script type="text/javascript" src="js/vue.js" ></script>
		<script type="text/javascript" src="js/jquery-3.2.1.min.js" ></script>
		<link rel="stylesheet" href="css/clubDetail.css" />
		<!--<style>
			html,body{
				width: 100%;
				height: 100%;
			}
			.part-one{
				height: 87%;
				width: 100%;				
				overflow: scroll;
				background-color: rgba(239,239,244,0.8);
			}
			.part-one::-webkit-scrollbar {
                  display: none;
            }
			.part-two{
				height: 13%;
				width: 100%;				
			}
			ul{
				margin: 0;
				padding: 0;
			}
			a{
				text-decoration: none;
				color: black;
			}
			.bottom{				
				border-top: 2px solid rgba(0,0,0,0.5);
				padding-top: 50px;				
				overflow: hidden;
				height: 100%;
				
			}
			li{
				list-style: none;
			}
			.bottom>li{
				float: left;
				width: 20%;	
				text-align: center;			
			}
			.bottom img{
				width: 40%;			
			}
			.bottom p{
				margin: 0;
				font-size: 40px;
				
			}	
			.part-one img{
				width: 100%;
				height: 30%;
			}
			table{            
              border-collapse: collapse;
              margin: 60px auto;
            }
            
            th,td{
               font-size: 43px;
               padding: 10px 15px;             
               text-align: center;
            }
            th{            	
               background: #f7f7f7;
               color: #5c6b77;
               font-weight: bold;
            }
            .guanzhu{
            	width: 60%;
            	height: 100px;
            	line-height: 100px;
            	text-align: center;
            	font-size: 60px;
            	border-radius: 30px;
            	background-color: rgba(255,0,0,0.6);
            	margin: 20px auto;
            }
		</style>-->
	</head>
	<body>
		 <div class="part-one" id="app">
		 	<a href="club.html"><img src="img/fanhui.png" style="width: 20px;"/></a>
		 	 
		 	<!-- <img :src="'http://172.24.10.175/workout/Uploads/'+img"/>-->
		 	 <img :src="'http://172.24.10.175/workout/Uploads/'+thumb" />
		     <table>
		     	<tbody>
		     		<tr>
		     			<td>俱乐部名称：</td>
		     			<td>{{club_name}}</td>
		     		</tr>
		     		<tr>
		     			<td>所在所在地：</td>
		     			<td>{{place}}</td>
		     		</tr>
		     		<tr>
		     			<td>俱乐部简介：</td>
		     			<td>{{introduce}}</td>
		     		</tr>
		     		<tr>
		     			<td>活动必须装备：</td>
		     			<td>{{equipsuggest}}</td>
		     		</tr>		     		
		     		<tr>
		     			<td>俱乐部电话：</td>
		     			<td>{{club_tel}}</td>
		     		</tr>
		     		<tr>
		     			<td>俱乐部开放时间：</td>
		     			<td>{{open_time}}</td>
		     		</tr>
		     	</tbody>
		     </table>
		    <!-- <div class="guanzhu">关注俱乐部</div>-->
		     <button type="submit" class="guanzhu" onclick="fan()" style="width: 99%;">关注</button>
		     
		     
		     
		 </div>
		 <!--<div class="part-two">
		 	 <ul class="bottom">
				<li>
					<a href="exercise.html">
					 <img src="img/健身.png" />
					 <p>训练</p>
				    </a>					
				</li>
				<li>
					<a href="club.html">
					  <img src="img/俱乐部.png" />
					  <p>俱乐部</p>
					 </a>
				</li>
				<li>
					<a href="index.html">
					  <img src="img/奖章.png" />
					  <p>约健</p>
					 </a>
				</li>
				<li>
					<a href="sharePic.html">
					  <img src="img/我的晒图.png" />
					  <p>晒图</p>
					 </a>
				</li>
				<li>
					<a href="my.html">
					  <img src="img/我的.png" />
					  <p>我的</p>
					</a>
				</li>				
			</ul>
		 </div>-->
		<!-- <script>-->
		 	<script type="text/javascript">
	          var uid=window.sessionStorage.getItem('userid');
//	          alert(uid);
//	          window.sessionStorage.setItem("uid",id);
	           function fan(id){
				 $.ajax({
		          type : 'GET',
		          dataType : 'jsonp',
		          data : {
		          	
		          },
		          url : "http://172.24.10.175/workout/api.php/create/mod/clubfans/club_id/8/user_id/ "+uid+"/fans_type/1",
		          success : function (data){
		          	
		          }
		    });
		    alert("关注成功");
			}


		 	
		 	
		 	
		 	
		 	
		 	var app=new Vue({
		 		el:"#app",
		 		data:{
		 			club_name:"",
		 			place:"",
		 			introduction:"",
		 			equipsuggest:"",		 			
		 			club_tel:"",
		 			open_time:"",
		 			thumb:""
		 		},
		 		mounted:function(){
		 			this.getData();
		 		},
		 		methods:{
		 			getData:function(){
		 				var id=location.href.split("?")[1].split("=")[1];
		 				console.log(id);
		 				var _this=this;
		 				
		 				$.ajax({
		 					type:"get",
		 					url:"http://172.24.10.175/workout/api.php/get/mod/club/id/"+id,
		 					async:true,
		 					dataType:"jsonp",
		 					success:function(data){
		 						_this.club_name=data.club_name;
		 						_this.place=data.province_name+data.city_name+data.club_contact;
		 						_this.introduction=data.introduction;
		 						_this.equipsuggest=data.equipsuggest;
		 						_this.club_tel=data.club_tel;
		 						_this.open_time=data.open_time;
		 						_this.thumb=data.thumb;
		 					}
		 				});
//		 				console.log(data);
		 			}
		 		}
		 	});
		 </script>
	</body>
</html>
